const Router = require('koa-router')
const {avatarHandle,pictureHandler} = require('../middleware/file.middleware')

const {verifyAuth} = require('../middleware/auth.middleware')
const {saveAvatarInfo,savePictureInfo} = require('../controller/file.controller')


const fileRouter = new Router({prefix:'/upload'})



fileRouter.post('/avatar',verifyAuth,avatarHandle,saveAvatarInfo)
fileRouter.post('/pictures',verifyAuth,pictureHandler,savePictureInfo)

module.exports = fileRouter